package org.xwalk.core.internal;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ApplicationErrorReport;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Paint;
import android.graphics.Rect;
import android.net.http.SslCertificate;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.os.Looper;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.Log;
import android.view.KeyEvent;
import android.view.SurfaceView;
import android.view.ViewGroup;
import android.view.View.OnTouchListener;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputConnection;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.ValueCallback;
import android.widget.FrameLayout;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.ref.WeakReference;
import java.util.Map;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.ValueCallback;

import java.lang.reflect.Constructor;
import java.lang.reflect.Method;

public class XWalkViewBridge extends XWalkViewInternal {
    private XWalkCoreBridge coreBridge;
    private Object wrapper;

    public Object getWrapper() {
        return wrapper;
    }



    public XWalkViewBridge(Context context, Object wrapper) {
        super(context);

        this.wrapper = wrapper;
        reflectionInit();

    }

        public XWalkViewBridge(Context context, AttributeSet attrs, Object wrapper) {
        super(context, attrs);

        this.wrapper = wrapper;
        reflectionInit();
        String animatable = null;
        try {
            animatable = (String) new ReflectField(wrapper, "mAnimatable").get();
        } catch (RuntimeException e) {
        }
        initXWalkContent(animatable);
    }

        public XWalkViewBridge(Context context, Activity activity, Object wrapper) {
        super(context, activity);

        this.wrapper = wrapper;
        reflectionInit();

    }

        @Override
    public void load(String url, String content) {
        if (loadStringStringMethod == null || loadStringStringMethod.isNull()) {
            loadSuper(url, content);
        } else {
            loadStringStringMethod.invoke(url, content);
        }
    }

    public void loadSuper(String url, String content) {
        super.load(url, content);
    }

    private ReflectMethod loadStringStringMethod = new ReflectMethod(null, "load");

    @Override
    public void load(String url, String content, Map<String, String> headers) {
        if (loadStringStringMapMethod == null || loadStringStringMapMethod.isNull()) {
            loadSuper(url, content, headers);
        } else {
            loadStringStringMapMethod.invoke(url, content, headers);
        }
    }

    public void loadSuper(String url, String content, Map<String, String> headers) {
        super.load(url, content, headers);
    }

    private ReflectMethod loadStringStringMapMethod = new ReflectMethod(null, "load");

    @Override
    public void loadData(String data, String mimeType, String encoding) {
        if (loadDataStringStringStringMethod == null || loadDataStringStringStringMethod.isNull()) {
            loadDataSuper(data, mimeType, encoding);
        } else {
            loadDataStringStringStringMethod.invoke(data, mimeType, encoding);
        }
    }

    public void loadDataSuper(String data, String mimeType, String encoding) {
        super.loadData(data, mimeType, encoding);
    }

    private ReflectMethod loadDataStringStringStringMethod = new ReflectMethod(null, "loadData");

    @Override
    public void loadDataWithBaseURL(final String baseUrl, final String data, final String mimeType, final String encoding, final String historyUrl) {
        if (loadDataWithBaseURLStringStringStringStringStringMethod == null || loadDataWithBaseURLStringStringStringStringStringMethod.isNull()) {
            loadDataWithBaseURLSuper(baseUrl, data, mimeType, encoding, historyUrl);
        } else {
            loadDataWithBaseURLStringStringStringStringStringMethod.invoke(baseUrl, data, mimeType, encoding, historyUrl);
        }
    }

    public void loadDataWithBaseURLSuper(final String baseUrl, final String data, final String mimeType, final String encoding, final String historyUrl) {
        super.loadDataWithBaseURL(baseUrl, data, mimeType, encoding, historyUrl);
    }

    private ReflectMethod loadDataWithBaseURLStringStringStringStringStringMethod = new ReflectMethod(null, "loadDataWithBaseURL");

    @Override
    public void loadUrl(String url) {
        if (loadUrlStringMethod == null || loadUrlStringMethod.isNull()) {
            loadUrlSuper(url);
        } else {
            loadUrlStringMethod.invoke(url);
        }
    }

    public void loadUrlSuper(String url) {
        super.loadUrl(url);
    }

    private ReflectMethod loadUrlStringMethod = new ReflectMethod(null, "loadUrl");

    @Override
    public void loadUrl(String url, Map<String, String> additionalHttpHeaders) {
        if (loadUrlStringMapMethod == null || loadUrlStringMapMethod.isNull()) {
            loadUrlSuper(url, additionalHttpHeaders);
        } else {
            loadUrlStringMapMethod.invoke(url, additionalHttpHeaders);
        }
    }

    public void loadUrlSuper(String url, Map<String, String> additionalHttpHeaders) {
        super.loadUrl(url, additionalHttpHeaders);
    }

    private ReflectMethod loadUrlStringMapMethod = new ReflectMethod(null, "loadUrl");

    @Override
    public void loadAppFromManifest(String url, String content) {
        if (loadAppFromManifestStringStringMethod == null || loadAppFromManifestStringStringMethod.isNull()) {
            loadAppFromManifestSuper(url, content);
        } else {
            loadAppFromManifestStringStringMethod.invoke(url, content);
        }
    }

    public void loadAppFromManifestSuper(String url, String content) {
        super.loadAppFromManifest(url, content);
    }

    private ReflectMethod loadAppFromManifestStringStringMethod = new ReflectMethod(null, "loadAppFromManifest");

    @Override
    public void reload(int mode) {
        if (reloadintMethod == null || reloadintMethod.isNull()) {
            reloadSuper(mode);
        } else {
            reloadintMethod.invoke(mode);
        }
    }

    public void reloadSuper(int mode) {
        super.reload(mode);
    }

    private ReflectMethod reloadintMethod = new ReflectMethod(null, "reload");

    @Override
    public void stopLoading() {
        if (stopLoadingMethod == null || stopLoadingMethod.isNull()) {
            stopLoadingSuper();
        } else {
            stopLoadingMethod.invoke();
        }
    }

    public void stopLoadingSuper() {
        super.stopLoading();
    }

    private ReflectMethod stopLoadingMethod = new ReflectMethod(null, "stopLoading");

    @Override
    public String getUrl() {
        if (getUrlMethod == null || getUrlMethod.isNull()) {
            return getUrlSuper();
        } else {
            return (String)getUrlMethod.invoke();
        }
    }

    public String getUrlSuper() {
        String ret;
        ret = super.getUrl();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getUrlMethod = new ReflectMethod(null, "getUrl");

    @Override
    public XWalkHitTestResultInternal getHitTestResult() {
        if (getHitTestResultMethod == null || getHitTestResultMethod.isNull()) {
            return getHitTestResultSuper();
        } else {
            return (XWalkHitTestResultBridge)coreBridge.getBridgeObject(getHitTestResultMethod.invoke());
        }
    }

    public XWalkHitTestResultBridge getHitTestResultSuper() {
        XWalkHitTestResultInternal ret;
        ret = super.getHitTestResult();
        if (ret == null) return null;
        return (ret instanceof XWalkHitTestResultBridge ? ((XWalkHitTestResultBridge) ret ) : new XWalkHitTestResultBridge(ret));
    }

    private ReflectMethod getHitTestResultMethod = new ReflectMethod(null, "getHitTestResult");

    @Override
    public int getContentHeight() {
        if (getContentHeightMethod == null || getContentHeightMethod.isNull()) {
            return getContentHeightSuper();
        } else {
            return (Integer)getContentHeightMethod.invoke();
        }
    }

    public int getContentHeightSuper() {
        int ret;
        ret = super.getContentHeight();
        
        return ret;
    }

    private ReflectMethod getContentHeightMethod = new ReflectMethod(null, "getContentHeight");

    @Override
    public String getTitle() {
        if (getTitleMethod == null || getTitleMethod.isNull()) {
            return getTitleSuper();
        } else {
            return (String)getTitleMethod.invoke();
        }
    }

    public String getTitleSuper() {
        String ret;
        ret = super.getTitle();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getTitleMethod = new ReflectMethod(null, "getTitle");

    @Override
    public String getOriginalUrl() {
        if (getOriginalUrlMethod == null || getOriginalUrlMethod.isNull()) {
            return getOriginalUrlSuper();
        } else {
            return (String)getOriginalUrlMethod.invoke();
        }
    }

    public String getOriginalUrlSuper() {
        String ret;
        ret = super.getOriginalUrl();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getOriginalUrlMethod = new ReflectMethod(null, "getOriginalUrl");

    @Override
    public XWalkNavigationHistoryInternal getNavigationHistory() {
        if (getNavigationHistoryMethod == null || getNavigationHistoryMethod.isNull()) {
            return getNavigationHistorySuper();
        } else {
            return (XWalkNavigationHistoryBridge)coreBridge.getBridgeObject(getNavigationHistoryMethod.invoke());
        }
    }

    public XWalkNavigationHistoryBridge getNavigationHistorySuper() {
        XWalkNavigationHistoryInternal ret;
        ret = super.getNavigationHistory();
        if (ret == null) return null;
        return (ret instanceof XWalkNavigationHistoryBridge ? ((XWalkNavigationHistoryBridge) ret ) : new XWalkNavigationHistoryBridge(ret));
    }

    private ReflectMethod getNavigationHistoryMethod = new ReflectMethod(null, "getNavigationHistory");

    @Override
    public void addJavascriptInterface(Object object, String name) {
        if (addJavascriptInterfaceObjectStringMethod == null || addJavascriptInterfaceObjectStringMethod.isNull()) {
            addJavascriptInterfaceSuper(object, name);
        } else {
            addJavascriptInterfaceObjectStringMethod.invoke(object, name);
        }
    }

    public void addJavascriptInterfaceSuper(Object object, String name) {
        super.addJavascriptInterface(object, name);
    }

    private ReflectMethod addJavascriptInterfaceObjectStringMethod = new ReflectMethod(null, "addJavascriptInterface");

    @Override
    public void removeJavascriptInterface(String name) {
        if (removeJavascriptInterfaceStringMethod == null || removeJavascriptInterfaceStringMethod.isNull()) {
            removeJavascriptInterfaceSuper(name);
        } else {
            removeJavascriptInterfaceStringMethod.invoke(name);
        }
    }

    public void removeJavascriptInterfaceSuper(String name) {
        super.removeJavascriptInterface(name);
    }

    private ReflectMethod removeJavascriptInterfaceStringMethod = new ReflectMethod(null, "removeJavascriptInterface");

    @Override
    public void evaluateJavascript(String script, ValueCallback<String> callback) {
        if (evaluateJavascriptStringValueCallbackMethod == null || evaluateJavascriptStringValueCallbackMethod.isNull()) {
            evaluateJavascriptSuper(script, callback);
        } else {
            evaluateJavascriptStringValueCallbackMethod.invoke(script, callback);
        }
    }

    public void evaluateJavascriptSuper(String script, ValueCallback<String> callback) {
        super.evaluateJavascript(script, callback);
    }

    private ReflectMethod evaluateJavascriptStringValueCallbackMethod = new ReflectMethod(null, "evaluateJavascript");

    @Override
    public void clearCache(boolean includeDiskFiles) {
        if (clearCachebooleanMethod == null || clearCachebooleanMethod.isNull()) {
            clearCacheSuper(includeDiskFiles);
        } else {
            clearCachebooleanMethod.invoke(includeDiskFiles);
        }
    }

    public void clearCacheSuper(boolean includeDiskFiles) {
        super.clearCache(includeDiskFiles);
    }

    private ReflectMethod clearCachebooleanMethod = new ReflectMethod(null, "clearCache");

    @Override
    public void clearCacheForSingleFile(String url) {
        if (clearCacheForSingleFileStringMethod == null || clearCacheForSingleFileStringMethod.isNull()) {
            clearCacheForSingleFileSuper(url);
        } else {
            clearCacheForSingleFileStringMethod.invoke(url);
        }
    }

    public void clearCacheForSingleFileSuper(String url) {
        super.clearCacheForSingleFile(url);
    }

    private ReflectMethod clearCacheForSingleFileStringMethod = new ReflectMethod(null, "clearCacheForSingleFile");

    @Override
    public boolean hasEnteredFullscreen() {
        if (hasEnteredFullscreenMethod == null || hasEnteredFullscreenMethod.isNull()) {
            return hasEnteredFullscreenSuper();
        } else {
            return (Boolean)hasEnteredFullscreenMethod.invoke();
        }
    }

    public boolean hasEnteredFullscreenSuper() {
        boolean ret;
        ret = super.hasEnteredFullscreen();
        
        return ret;
    }

    private ReflectMethod hasEnteredFullscreenMethod = new ReflectMethod(null, "hasEnteredFullscreen");

    @Override
    public void leaveFullscreen() {
        if (leaveFullscreenMethod == null || leaveFullscreenMethod.isNull()) {
            leaveFullscreenSuper();
        } else {
            leaveFullscreenMethod.invoke();
        }
    }

    public void leaveFullscreenSuper() {
        super.leaveFullscreen();
    }

    private ReflectMethod leaveFullscreenMethod = new ReflectMethod(null, "leaveFullscreen");

    @Override
    public void pauseTimers() {
        if (pauseTimersMethod == null || pauseTimersMethod.isNull()) {
            pauseTimersSuper();
        } else {
            pauseTimersMethod.invoke();
        }
    }

    public void pauseTimersSuper() {
        super.pauseTimers();
    }

    private ReflectMethod pauseTimersMethod = new ReflectMethod(null, "pauseTimers");

    @Override
    public void resumeTimers() {
        if (resumeTimersMethod == null || resumeTimersMethod.isNull()) {
            resumeTimersSuper();
        } else {
            resumeTimersMethod.invoke();
        }
    }

    public void resumeTimersSuper() {
        super.resumeTimers();
    }

    private ReflectMethod resumeTimersMethod = new ReflectMethod(null, "resumeTimers");

    @Override
    public void onHide() {
        if (onHideMethod == null || onHideMethod.isNull()) {
            onHideSuper();
        } else {
            onHideMethod.invoke();
        }
    }

    public void onHideSuper() {
        super.onHide();
    }

    private ReflectMethod onHideMethod = new ReflectMethod(null, "onHide");

    @Override
    public void onShow() {
        if (onShowMethod == null || onShowMethod.isNull()) {
            onShowSuper();
        } else {
            onShowMethod.invoke();
        }
    }

    public void onShowSuper() {
        super.onShow();
    }

    private ReflectMethod onShowMethod = new ReflectMethod(null, "onShow");

    @Override
    public void onDestroy() {
        if (onDestroyMethod == null || onDestroyMethod.isNull()) {
            onDestroySuper();
        } else {
            onDestroyMethod.invoke();
        }
    }

    public void onDestroySuper() {
        super.onDestroy();
    }

    private ReflectMethod onDestroyMethod = new ReflectMethod(null, "onDestroy");

    @Override
    public void startActivityForResult(Intent intent, int requestCode, Bundle options) {
        if (startActivityForResultIntentintBundleMethod == null || startActivityForResultIntentintBundleMethod.isNull()) {
            startActivityForResultSuper(intent, requestCode, options);
        } else {
            startActivityForResultIntentintBundleMethod.invoke(intent, requestCode, options);
        }
    }

    public void startActivityForResultSuper(Intent intent, int requestCode, Bundle options) {
        super.startActivityForResult(intent, requestCode, options);
    }

    private ReflectMethod startActivityForResultIntentintBundleMethod = new ReflectMethod(null, "startActivityForResult");

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (onActivityResultintintIntentMethod == null || onActivityResultintintIntentMethod.isNull()) {
            onActivityResultSuper(requestCode, resultCode, data);
        } else {
            onActivityResultintintIntentMethod.invoke(requestCode, resultCode, data);
        }
    }

    public void onActivityResultSuper(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    }

    private ReflectMethod onActivityResultintintIntentMethod = new ReflectMethod(null, "onActivityResult");

    @Override
    public boolean onNewIntent(Intent intent) {
        if (onNewIntentIntentMethod == null || onNewIntentIntentMethod.isNull()) {
            return onNewIntentSuper(intent);
        } else {
            return (Boolean)onNewIntentIntentMethod.invoke(intent);
        }
    }

    public boolean onNewIntentSuper(Intent intent) {
        boolean ret;
        ret = super.onNewIntent(intent);
        
        return ret;
    }

    private ReflectMethod onNewIntentIntentMethod = new ReflectMethod(null, "onNewIntent");

    @Override
    public boolean saveState(Bundle outState) {
        if (saveStateBundleMethod == null || saveStateBundleMethod.isNull()) {
            return saveStateSuper(outState);
        } else {
            return (Boolean)saveStateBundleMethod.invoke(outState);
        }
    }

    public boolean saveStateSuper(Bundle outState) {
        boolean ret;
        ret = super.saveState(outState);
        
        return ret;
    }

    private ReflectMethod saveStateBundleMethod = new ReflectMethod(null, "saveState");

    @Override
    public boolean restoreState(Bundle inState) {
        if (restoreStateBundleMethod == null || restoreStateBundleMethod.isNull()) {
            return restoreStateSuper(inState);
        } else {
            return (Boolean)restoreStateBundleMethod.invoke(inState);
        }
    }

    public boolean restoreStateSuper(Bundle inState) {
        boolean ret;
        ret = super.restoreState(inState);
        
        return ret;
    }

    private ReflectMethod restoreStateBundleMethod = new ReflectMethod(null, "restoreState");

    @Override
    public String getAPIVersion() {
        if (getAPIVersionMethod == null || getAPIVersionMethod.isNull()) {
            return getAPIVersionSuper();
        } else {
            return (String)getAPIVersionMethod.invoke();
        }
    }

    public String getAPIVersionSuper() {
        String ret;
        ret = super.getAPIVersion();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getAPIVersionMethod = new ReflectMethod(null, "getAPIVersion");

    @Override
    public String getXWalkVersion() {
        if (getXWalkVersionMethod == null || getXWalkVersionMethod.isNull()) {
            return getXWalkVersionSuper();
        } else {
            return (String)getXWalkVersionMethod.invoke();
        }
    }

    public String getXWalkVersionSuper() {
        String ret;
        ret = super.getXWalkVersion();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getXWalkVersionMethod = new ReflectMethod(null, "getXWalkVersion");

    @Override
    public void setUIClient(XWalkUIClientInternal client) {
        if ((client instanceof XWalkUIClientBridge)) {
            setUIClient((XWalkUIClientBridge) client);
        } else {
            super.setUIClient(client);
        }
    }

    public void setUIClient(XWalkUIClientBridge client) {
        if (setUIClientXWalkUIClientInternalMethod == null || setUIClientXWalkUIClientInternalMethod.isNull()) {
            setUIClientSuper(client);
        } else {
            setUIClientXWalkUIClientInternalMethod.invoke((client instanceof XWalkUIClientBridge ? ((XWalkUIClientBridge) client ) : null).getWrapper());
        }
    }

    public void setUIClientSuper(XWalkUIClientBridge client) {
        super.setUIClient(client);
    }

    private ReflectMethod setUIClientXWalkUIClientInternalMethod = new ReflectMethod(null, "setUIClient");

    @Override
    public void setResourceClient(XWalkResourceClientInternal client) {
        if ((client instanceof XWalkResourceClientBridge)) {
            setResourceClient((XWalkResourceClientBridge) client);
        } else {
            super.setResourceClient(client);
        }
    }

    public void setResourceClient(XWalkResourceClientBridge client) {
        if (setResourceClientXWalkResourceClientInternalMethod == null || setResourceClientXWalkResourceClientInternalMethod.isNull()) {
            setResourceClientSuper(client);
        } else {
            setResourceClientXWalkResourceClientInternalMethod.invoke((client instanceof XWalkResourceClientBridge ? ((XWalkResourceClientBridge) client ) : null).getWrapper());
        }
    }

    public void setResourceClientSuper(XWalkResourceClientBridge client) {
        super.setResourceClient(client);
    }

    private ReflectMethod setResourceClientXWalkResourceClientInternalMethod = new ReflectMethod(null, "setResourceClient");

    @Override
    public void setBackgroundColor(int color) {
        if (setBackgroundColorintMethod == null || setBackgroundColorintMethod.isNull()) {
            setBackgroundColorSuper(color);
        } else {
            setBackgroundColorintMethod.invoke(color);
        }
    }

    public void setBackgroundColorSuper(int color) {
        super.setBackgroundColor(color);
    }

    private ReflectMethod setBackgroundColorintMethod = new ReflectMethod(null, "setBackgroundColor");

    @Override
    public void setOriginAccessWhitelist(String url, String[] patterns) {
        if (setOriginAccessWhitelistStringStringArrayMethod == null || setOriginAccessWhitelistStringStringArrayMethod.isNull()) {
            setOriginAccessWhitelistSuper(url, patterns);
        } else {
            setOriginAccessWhitelistStringStringArrayMethod.invoke(url, patterns);
        }
    }

    public void setOriginAccessWhitelistSuper(String url, String[] patterns) {
        super.setOriginAccessWhitelist(url, patterns);
    }

    private ReflectMethod setOriginAccessWhitelistStringStringArrayMethod = new ReflectMethod(null, "setOriginAccessWhitelist");

    @Override
    public void setLayerType(int layerType, Paint paint) {
        if (setLayerTypeintPaintMethod == null || setLayerTypeintPaintMethod.isNull()) {
            setLayerTypeSuper(layerType, paint);
        } else {
            setLayerTypeintPaintMethod.invoke(layerType, paint);
        }
    }

    public void setLayerTypeSuper(int layerType, Paint paint) {
        super.setLayerType(layerType, paint);
    }

    private ReflectMethod setLayerTypeintPaintMethod = new ReflectMethod(null, "setLayerType");

    @Override
    public void setUserAgentString(String userAgent) {
        if (setUserAgentStringStringMethod == null || setUserAgentStringStringMethod.isNull()) {
            setUserAgentStringSuper(userAgent);
        } else {
            setUserAgentStringStringMethod.invoke(userAgent);
        }
    }

    public void setUserAgentStringSuper(String userAgent) {
        super.setUserAgentString(userAgent);
    }

    private ReflectMethod setUserAgentStringStringMethod = new ReflectMethod(null, "setUserAgentString");

    @Override
    public String getUserAgentString() {
        if (getUserAgentStringMethod == null || getUserAgentStringMethod.isNull()) {
            return getUserAgentStringSuper();
        } else {
            return (String)getUserAgentStringMethod.invoke();
        }
    }

    public String getUserAgentStringSuper() {
        String ret;
        ret = super.getUserAgentString();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getUserAgentStringMethod = new ReflectMethod(null, "getUserAgentString");

    @Override
    public void setAcceptLanguages(final String acceptLanguages) {
        if (setAcceptLanguagesStringMethod == null || setAcceptLanguagesStringMethod.isNull()) {
            setAcceptLanguagesSuper(acceptLanguages);
        } else {
            setAcceptLanguagesStringMethod.invoke(acceptLanguages);
        }
    }

    public void setAcceptLanguagesSuper(final String acceptLanguages) {
        super.setAcceptLanguages(acceptLanguages);
    }

    private ReflectMethod setAcceptLanguagesStringMethod = new ReflectMethod(null, "setAcceptLanguages");

    @Override
    public void captureBitmapAsync(XWalkGetBitmapCallbackInternal callback) {
        if ((callback instanceof XWalkGetBitmapCallbackBridge)) {
            captureBitmapAsync((XWalkGetBitmapCallbackBridge) callback);
        } else {
            super.captureBitmapAsync(callback);
        }
    }

    public void captureBitmapAsync(XWalkGetBitmapCallbackBridge callback) {
        if (captureBitmapAsyncXWalkGetBitmapCallbackInternalMethod == null || captureBitmapAsyncXWalkGetBitmapCallbackInternalMethod.isNull()) {
            captureBitmapAsyncSuper(callback);
        } else {
            captureBitmapAsyncXWalkGetBitmapCallbackInternalMethod.invoke((callback instanceof XWalkGetBitmapCallbackBridge ? ((XWalkGetBitmapCallbackBridge) callback ) : null).getWrapper());
        }
    }

    public void captureBitmapAsyncSuper(XWalkGetBitmapCallbackBridge callback) {
        super.captureBitmapAsync(callback);
    }

    private ReflectMethod captureBitmapAsyncXWalkGetBitmapCallbackInternalMethod = new ReflectMethod(null, "captureBitmapAsync");

    @Override
    public XWalkSettingsInternal getSettings() {
        if (getSettingsMethod == null || getSettingsMethod.isNull()) {
            return getSettingsSuper();
        } else {
            return (XWalkSettingsBridge)coreBridge.getBridgeObject(getSettingsMethod.invoke());
        }
    }

    public XWalkSettingsBridge getSettingsSuper() {
        XWalkSettingsInternal ret;
        ret = super.getSettings();
        if (ret == null) return null;
        return (ret instanceof XWalkSettingsBridge ? ((XWalkSettingsBridge) ret ) : new XWalkSettingsBridge(ret));
    }

    private ReflectMethod getSettingsMethod = new ReflectMethod(null, "getSettings");

    @Override
    public void setNetworkAvailable(boolean networkUp) {
        if (setNetworkAvailablebooleanMethod == null || setNetworkAvailablebooleanMethod.isNull()) {
            setNetworkAvailableSuper(networkUp);
        } else {
            setNetworkAvailablebooleanMethod.invoke(networkUp);
        }
    }

    public void setNetworkAvailableSuper(boolean networkUp) {
        super.setNetworkAvailable(networkUp);
    }

    private ReflectMethod setNetworkAvailablebooleanMethod = new ReflectMethod(null, "setNetworkAvailable");

    @Override
    public Uri getRemoteDebuggingUrl() {
        if (getRemoteDebuggingUrlMethod == null || getRemoteDebuggingUrlMethod.isNull()) {
            return getRemoteDebuggingUrlSuper();
        } else {
            return (Uri)getRemoteDebuggingUrlMethod.invoke();
        }
    }

    public Uri getRemoteDebuggingUrlSuper() {
        Uri ret;
        ret = super.getRemoteDebuggingUrl();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getRemoteDebuggingUrlMethod = new ReflectMethod(null, "getRemoteDebuggingUrl");

    @Override
    public boolean zoomIn() {
        if (zoomInMethod == null || zoomInMethod.isNull()) {
            return zoomInSuper();
        } else {
            return (Boolean)zoomInMethod.invoke();
        }
    }

    public boolean zoomInSuper() {
        boolean ret;
        ret = super.zoomIn();
        
        return ret;
    }

    private ReflectMethod zoomInMethod = new ReflectMethod(null, "zoomIn");

    @Override
    public boolean zoomOut() {
        if (zoomOutMethod == null || zoomOutMethod.isNull()) {
            return zoomOutSuper();
        } else {
            return (Boolean)zoomOutMethod.invoke();
        }
    }

    public boolean zoomOutSuper() {
        boolean ret;
        ret = super.zoomOut();
        
        return ret;
    }

    private ReflectMethod zoomOutMethod = new ReflectMethod(null, "zoomOut");

    @Override
    public void zoomBy(float factor) {
        if (zoomByfloatMethod == null || zoomByfloatMethod.isNull()) {
            zoomBySuper(factor);
        } else {
            zoomByfloatMethod.invoke(factor);
        }
    }

    public void zoomBySuper(float factor) {
        super.zoomBy(factor);
    }

    private ReflectMethod zoomByfloatMethod = new ReflectMethod(null, "zoomBy");

    @Override
    public boolean canZoomIn() {
        if (canZoomInMethod == null || canZoomInMethod.isNull()) {
            return canZoomInSuper();
        } else {
            return (Boolean)canZoomInMethod.invoke();
        }
    }

    public boolean canZoomInSuper() {
        boolean ret;
        ret = super.canZoomIn();
        
        return ret;
    }

    private ReflectMethod canZoomInMethod = new ReflectMethod(null, "canZoomIn");

    @Override
    public boolean canZoomOut() {
        if (canZoomOutMethod == null || canZoomOutMethod.isNull()) {
            return canZoomOutSuper();
        } else {
            return (Boolean)canZoomOutMethod.invoke();
        }
    }

    public boolean canZoomOutSuper() {
        boolean ret;
        ret = super.canZoomOut();
        
        return ret;
    }

    private ReflectMethod canZoomOutMethod = new ReflectMethod(null, "canZoomOut");

    @Override
    public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
        if (onCreateInputConnectionEditorInfoMethod == null || onCreateInputConnectionEditorInfoMethod.isNull()) {
            return onCreateInputConnectionSuper(outAttrs);
        } else {
            return (InputConnection)onCreateInputConnectionEditorInfoMethod.invoke(outAttrs);
        }
    }

    public InputConnection onCreateInputConnectionSuper(EditorInfo outAttrs) {
        InputConnection ret;
        ret = super.onCreateInputConnection(outAttrs);
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod onCreateInputConnectionEditorInfoMethod = new ReflectMethod(null, "onCreateInputConnection");

    @Override
    public void setInitialScale(int scaleInPercent) {
        if (setInitialScaleintMethod == null || setInitialScaleintMethod.isNull()) {
            setInitialScaleSuper(scaleInPercent);
        } else {
            setInitialScaleintMethod.invoke(scaleInPercent);
        }
    }

    public void setInitialScaleSuper(int scaleInPercent) {
        super.setInitialScale(scaleInPercent);
    }

    private ReflectMethod setInitialScaleintMethod = new ReflectMethod(null, "setInitialScale");

    @Override
    public Bitmap getFavicon() {
        if (getFaviconMethod == null || getFaviconMethod.isNull()) {
            return getFaviconSuper();
        } else {
            return (Bitmap)getFaviconMethod.invoke();
        }
    }

    public Bitmap getFaviconSuper() {
        Bitmap ret;
        ret = super.getFavicon();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getFaviconMethod = new ReflectMethod(null, "getFavicon");

    @Override
    public void setZOrderOnTop(boolean onTop) {
        if (setZOrderOnTopbooleanMethod == null || setZOrderOnTopbooleanMethod.isNull()) {
            setZOrderOnTopSuper(onTop);
        } else {
            setZOrderOnTopbooleanMethod.invoke(onTop);
        }
    }

    public void setZOrderOnTopSuper(boolean onTop) {
        super.setZOrderOnTop(onTop);
    }

    private ReflectMethod setZOrderOnTopbooleanMethod = new ReflectMethod(null, "setZOrderOnTop");

    @Override
    public void clearFormData() {
        if (clearFormDataMethod == null || clearFormDataMethod.isNull()) {
            clearFormDataSuper();
        } else {
            clearFormDataMethod.invoke();
        }
    }

    public void clearFormDataSuper() {
        super.clearFormData();
    }

    private ReflectMethod clearFormDataMethod = new ReflectMethod(null, "clearFormData");

    @Override
    public void setVisibility(int visibility) {
        if (setVisibilityintMethod == null || setVisibilityintMethod.isNull()) {
            setVisibilitySuper(visibility);
        } else {
            setVisibilityintMethod.invoke(visibility);
        }
    }

    public void setVisibilitySuper(int visibility) {
        super.setVisibility(visibility);
    }

    private ReflectMethod setVisibilityintMethod = new ReflectMethod(null, "setVisibility");

    @Override
    public void setSurfaceViewVisibility(int visibility) {
        if (setSurfaceViewVisibilityintMethod == null || setSurfaceViewVisibilityintMethod.isNull()) {
            setSurfaceViewVisibilitySuper(visibility);
        } else {
            setSurfaceViewVisibilityintMethod.invoke(visibility);
        }
    }

    public void setSurfaceViewVisibilitySuper(int visibility) {
        super.setSurfaceViewVisibility(visibility);
    }

    private ReflectMethod setSurfaceViewVisibilityintMethod = new ReflectMethod(null, "setSurfaceViewVisibility");

    @Override
    public void setXWalkViewInternalVisibility(int visibility) {
        if (setXWalkViewInternalVisibilityintMethod == null || setXWalkViewInternalVisibilityintMethod.isNull()) {
            setXWalkViewInternalVisibilitySuper(visibility);
        } else {
            setXWalkViewInternalVisibilityintMethod.invoke(visibility);
        }
    }

    public void setXWalkViewInternalVisibilitySuper(int visibility) {
        super.setXWalkViewInternalVisibility(visibility);
    }

    private ReflectMethod setXWalkViewInternalVisibilityintMethod = new ReflectMethod(null, "setXWalkViewInternalVisibility");

    @Override
    public void setDownloadListener(XWalkDownloadListenerInternal listener) {
        if ((listener instanceof XWalkDownloadListenerBridge)) {
            setDownloadListener((XWalkDownloadListenerBridge) listener);
        } else {
            super.setDownloadListener(listener);
        }
    }

    public void setDownloadListener(XWalkDownloadListenerBridge listener) {
        if (setDownloadListenerXWalkDownloadListenerInternalMethod == null || setDownloadListenerXWalkDownloadListenerInternalMethod.isNull()) {
            setDownloadListenerSuper(listener);
        } else {
            setDownloadListenerXWalkDownloadListenerInternalMethod.invoke((listener instanceof XWalkDownloadListenerBridge ? ((XWalkDownloadListenerBridge) listener ) : null).getWrapper());
        }
    }

    public void setDownloadListenerSuper(XWalkDownloadListenerBridge listener) {
        super.setDownloadListener(listener);
    }

    private ReflectMethod setDownloadListenerXWalkDownloadListenerInternalMethod = new ReflectMethod(null, "setDownloadListener");

    @Override
    public boolean performLongClickDelegate() {
        if (performLongClickDelegateMethod == null || performLongClickDelegateMethod.isNull()) {
            return performLongClickDelegateSuper();
        } else {
            return (Boolean)performLongClickDelegateMethod.invoke();
        }
    }

    public boolean performLongClickDelegateSuper() {
        boolean ret;
        ret = super.performLongClickDelegate();
        
        return ret;
    }

    private ReflectMethod performLongClickDelegateMethod = new ReflectMethod(null, "performLongClickDelegate");

    @Override
    public boolean onTouchEventDelegate(MotionEvent event) {
        if (onTouchEventDelegateMotionEventMethod == null || onTouchEventDelegateMotionEventMethod.isNull()) {
            return onTouchEventDelegateSuper(event);
        } else {
            return (Boolean)onTouchEventDelegateMotionEventMethod.invoke(event);
        }
    }

    public boolean onTouchEventDelegateSuper(MotionEvent event) {
        boolean ret;
        ret = super.onTouchEventDelegate(event);
        
        return ret;
    }

    private ReflectMethod onTouchEventDelegateMotionEventMethod = new ReflectMethod(null, "onTouchEventDelegate");

    @Override
    public boolean onTouchEvent(MotionEvent event) {
        if (onTouchEventMotionEventMethod == null || onTouchEventMotionEventMethod.isNull()) {
            return onTouchEventSuper(event);
        } else {
            return (Boolean)onTouchEventMotionEventMethod.invoke(event);
        }
    }

    public boolean onTouchEventSuper(MotionEvent event) {
        boolean ret;
        ret = super.onTouchEvent(event);
        
        return ret;
    }

    private ReflectMethod onTouchEventMotionEventMethod = new ReflectMethod(null, "onTouchEvent");

    @Override
    public void onScrollChangedDelegate(int l, int t, int oldl, int oldt) {
        if (onScrollChangedDelegateintintintintMethod == null || onScrollChangedDelegateintintintintMethod.isNull()) {
            onScrollChangedDelegateSuper(l, t, oldl, oldt);
        } else {
            onScrollChangedDelegateintintintintMethod.invoke(l, t, oldl, oldt);
        }
    }

    public void onScrollChangedDelegateSuper(int l, int t, int oldl, int oldt) {
        super.onScrollChangedDelegate(l, t, oldl, oldt);
    }

    private ReflectMethod onScrollChangedDelegateintintintintMethod = new ReflectMethod(null, "onScrollChangedDelegate");

    @Override
    public void onFocusChangedDelegate(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
        if (onFocusChangedDelegatebooleanintRectMethod == null || onFocusChangedDelegatebooleanintRectMethod.isNull()) {
            onFocusChangedDelegateSuper(gainFocus, direction, previouslyFocusedRect);
        } else {
            onFocusChangedDelegatebooleanintRectMethod.invoke(gainFocus, direction, previouslyFocusedRect);
        }
    }

    public void onFocusChangedDelegateSuper(boolean gainFocus, int direction, Rect previouslyFocusedRect) {
        super.onFocusChangedDelegate(gainFocus, direction, previouslyFocusedRect);
    }

    private ReflectMethod onFocusChangedDelegatebooleanintRectMethod = new ReflectMethod(null, "onFocusChangedDelegate");

    @Override
    public void onOverScrolledDelegate(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
        if (onOverScrolledDelegateintintbooleanbooleanMethod == null || onOverScrolledDelegateintintbooleanbooleanMethod.isNull()) {
            onOverScrolledDelegateSuper(scrollX, scrollY, clampedX, clampedY);
        } else {
            onOverScrolledDelegateintintbooleanbooleanMethod.invoke(scrollX, scrollY, clampedX, clampedY);
        }
    }

    public void onOverScrolledDelegateSuper(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
        super.onOverScrolledDelegate(scrollX, scrollY, clampedX, clampedY);
    }

    private ReflectMethod onOverScrolledDelegateintintbooleanbooleanMethod = new ReflectMethod(null, "onOverScrolledDelegate");

    @Override
    public void setOnTouchListener(OnTouchListener l) {
        if (setOnTouchListenerOnTouchListenerMethod == null || setOnTouchListenerOnTouchListenerMethod.isNull()) {
            setOnTouchListenerSuper(l);
        } else {
            setOnTouchListenerOnTouchListenerMethod.invoke(l);
        }
    }

    public void setOnTouchListenerSuper(OnTouchListener l) {
        super.setOnTouchListener(l);
    }

    private ReflectMethod setOnTouchListenerOnTouchListenerMethod = new ReflectMethod(null, "setOnTouchListener");

    @Override
    public void scrollTo(int x, int y) {
        if (scrollTointintMethod == null || scrollTointintMethod.isNull()) {
            scrollToSuper(x, y);
        } else {
            scrollTointintMethod.invoke(x, y);
        }
    }

    public void scrollToSuper(int x, int y) {
        super.scrollTo(x, y);
    }

    private ReflectMethod scrollTointintMethod = new ReflectMethod(null, "scrollTo");

    @Override
    public void scrollBy(int x, int y) {
        if (scrollByintintMethod == null || scrollByintintMethod.isNull()) {
            scrollBySuper(x, y);
        } else {
            scrollByintintMethod.invoke(x, y);
        }
    }

    public void scrollBySuper(int x, int y) {
        super.scrollBy(x, y);
    }

    private ReflectMethod scrollByintintMethod = new ReflectMethod(null, "scrollBy");

    @Override
    public int computeHorizontalScrollRange() {
        if (computeHorizontalScrollRangeMethod == null || computeHorizontalScrollRangeMethod.isNull()) {
            return computeHorizontalScrollRangeSuper();
        } else {
            return (Integer)computeHorizontalScrollRangeMethod.invoke();
        }
    }

    public int computeHorizontalScrollRangeSuper() {
        int ret;
        ret = super.computeHorizontalScrollRange();
        
        return ret;
    }

    private ReflectMethod computeHorizontalScrollRangeMethod = new ReflectMethod(null, "computeHorizontalScrollRange");

    @Override
    public int computeHorizontalScrollOffset() {
        if (computeHorizontalScrollOffsetMethod == null || computeHorizontalScrollOffsetMethod.isNull()) {
            return computeHorizontalScrollOffsetSuper();
        } else {
            return (Integer)computeHorizontalScrollOffsetMethod.invoke();
        }
    }

    public int computeHorizontalScrollOffsetSuper() {
        int ret;
        ret = super.computeHorizontalScrollOffset();
        
        return ret;
    }

    private ReflectMethod computeHorizontalScrollOffsetMethod = new ReflectMethod(null, "computeHorizontalScrollOffset");

    @Override
    public int computeVerticalScrollRange() {
        if (computeVerticalScrollRangeMethod == null || computeVerticalScrollRangeMethod.isNull()) {
            return computeVerticalScrollRangeSuper();
        } else {
            return (Integer)computeVerticalScrollRangeMethod.invoke();
        }
    }

    public int computeVerticalScrollRangeSuper() {
        int ret;
        ret = super.computeVerticalScrollRange();
        
        return ret;
    }

    private ReflectMethod computeVerticalScrollRangeMethod = new ReflectMethod(null, "computeVerticalScrollRange");

    @Override
    public int computeVerticalScrollOffset() {
        if (computeVerticalScrollOffsetMethod == null || computeVerticalScrollOffsetMethod.isNull()) {
            return computeVerticalScrollOffsetSuper();
        } else {
            return (Integer)computeVerticalScrollOffsetMethod.invoke();
        }
    }

    public int computeVerticalScrollOffsetSuper() {
        int ret;
        ret = super.computeVerticalScrollOffset();
        
        return ret;
    }

    private ReflectMethod computeVerticalScrollOffsetMethod = new ReflectMethod(null, "computeVerticalScrollOffset");

    @Override
    public int computeVerticalScrollExtent() {
        if (computeVerticalScrollExtentMethod == null || computeVerticalScrollExtentMethod.isNull()) {
            return computeVerticalScrollExtentSuper();
        } else {
            return (Integer)computeVerticalScrollExtentMethod.invoke();
        }
    }

    public int computeVerticalScrollExtentSuper() {
        int ret;
        ret = super.computeVerticalScrollExtent();
        
        return ret;
    }

    private ReflectMethod computeVerticalScrollExtentMethod = new ReflectMethod(null, "computeVerticalScrollExtent");

    @Override
    public XWalkExternalExtensionManagerInternal getExtensionManager() {
        if (getExtensionManagerMethod == null || getExtensionManagerMethod.isNull()) {
            return getExtensionManagerSuper();
        } else {
            return (XWalkExternalExtensionManagerBridge)coreBridge.getBridgeObject(getExtensionManagerMethod.invoke());
        }
    }

    public XWalkExternalExtensionManagerBridge getExtensionManagerSuper() {
        XWalkExternalExtensionManagerInternal ret;
        ret = super.getExtensionManager();
        if (ret == null) return null;
        return (ret instanceof XWalkExternalExtensionManagerBridge ? ((XWalkExternalExtensionManagerBridge) ret ) : null);
    }

    private ReflectMethod getExtensionManagerMethod = new ReflectMethod(null, "getExtensionManager");

    @Override
    public void clearSslPreferences() {
        if (clearSslPreferencesMethod == null || clearSslPreferencesMethod.isNull()) {
            clearSslPreferencesSuper();
        } else {
            clearSslPreferencesMethod.invoke();
        }
    }

    public void clearSslPreferencesSuper() {
        super.clearSslPreferences();
    }

    private ReflectMethod clearSslPreferencesMethod = new ReflectMethod(null, "clearSslPreferences");

    @Override
    public void clearClientCertPreferences(Runnable callback) {
        if (clearClientCertPreferencesRunnableMethod == null || clearClientCertPreferencesRunnableMethod.isNull()) {
            clearClientCertPreferencesSuper(callback);
        } else {
            clearClientCertPreferencesRunnableMethod.invoke(callback);
        }
    }

    public void clearClientCertPreferencesSuper(Runnable callback) {
        super.clearClientCertPreferences(callback);
    }

    private ReflectMethod clearClientCertPreferencesRunnableMethod = new ReflectMethod(null, "clearClientCertPreferences");

    @Override
    public SslCertificate getCertificate() {
        if (getCertificateMethod == null || getCertificateMethod.isNull()) {
            return getCertificateSuper();
        } else {
            return (SslCertificate)getCertificateMethod.invoke();
        }
    }

    public SslCertificate getCertificateSuper() {
        SslCertificate ret;
        ret = super.getCertificate();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getCertificateMethod = new ReflectMethod(null, "getCertificate");

    @Override
    public void setFindListener(XWalkFindListenerInternal listener) {
        if ((listener instanceof XWalkFindListenerBridge)) {
            setFindListener((XWalkFindListenerBridge) listener);
        } else {
            super.setFindListener(listener);
        }
    }

    public void setFindListener(XWalkFindListenerBridge listener) {
        if (setFindListenerXWalkFindListenerInternalMethod == null || setFindListenerXWalkFindListenerInternalMethod.isNull()) {
            setFindListenerSuper(listener);
        } else {
            setFindListenerXWalkFindListenerInternalMethod.invoke((listener instanceof XWalkFindListenerBridge ? ((XWalkFindListenerBridge) listener ) : null).getWrapper());
        }
    }

    public void setFindListenerSuper(XWalkFindListenerBridge listener) {
        super.setFindListener(listener);
    }

    private ReflectMethod setFindListenerXWalkFindListenerInternalMethod = new ReflectMethod(null, "setFindListener");

    @Override
    public void findAllAsync(String searchString) {
        if (findAllAsyncStringMethod == null || findAllAsyncStringMethod.isNull()) {
            findAllAsyncSuper(searchString);
        } else {
            findAllAsyncStringMethod.invoke(searchString);
        }
    }

    public void findAllAsyncSuper(String searchString) {
        super.findAllAsync(searchString);
    }

    private ReflectMethod findAllAsyncStringMethod = new ReflectMethod(null, "findAllAsync");

    @Override
    public void findNext(boolean forward) {
        if (findNextbooleanMethod == null || findNextbooleanMethod.isNull()) {
            findNextSuper(forward);
        } else {
            findNextbooleanMethod.invoke(forward);
        }
    }

    public void findNextSuper(boolean forward) {
        super.findNext(forward);
    }

    private ReflectMethod findNextbooleanMethod = new ReflectMethod(null, "findNext");

    @Override
    public void clearMatches() {
        if (clearMatchesMethod == null || clearMatchesMethod.isNull()) {
            clearMatchesSuper();
        } else {
            clearMatchesMethod.invoke();
        }
    }

    public void clearMatchesSuper() {
        super.clearMatches();
    }

    private ReflectMethod clearMatchesMethod = new ReflectMethod(null, "clearMatches");

    @Override
    public String getCompositingSurfaceType() {
        if (getCompositingSurfaceTypeMethod == null || getCompositingSurfaceTypeMethod.isNull()) {
            return getCompositingSurfaceTypeSuper();
        } else {
            return (String)getCompositingSurfaceTypeMethod.invoke();
        }
    }

    public String getCompositingSurfaceTypeSuper() {
        String ret;
        ret = super.getCompositingSurfaceType();
        if (ret == null) return null;
        return ret;
    }

    private ReflectMethod getCompositingSurfaceTypeMethod = new ReflectMethod(null, "getCompositingSurfaceType");


    void reflectionInit() {
        coreBridge = XWalkCoreBridge.getInstance();
        if (coreBridge == null) return;

        loadStringStringMethod.init(wrapper, null,
                "load", String.class, String.class);
        loadStringStringMapMethod.init(wrapper, null,
                "load", String.class, String.class, Map.class);
        loadDataStringStringStringMethod.init(wrapper, null,
                "loadData", String.class, String.class, String.class);
        loadDataWithBaseURLStringStringStringStringStringMethod.init(wrapper, null,
                "loadDataWithBaseURL", String.class, String.class, String.class, String.class, String.class);
        loadUrlStringMethod.init(wrapper, null,
                "loadUrl", String.class);
        loadUrlStringMapMethod.init(wrapper, null,
                "loadUrl", String.class, Map.class);
        loadAppFromManifestStringStringMethod.init(wrapper, null,
                "loadAppFromManifest", String.class, String.class);
        reloadintMethod.init(wrapper, null,
                "reload", int.class);
        stopLoadingMethod.init(wrapper, null,
                "stopLoading");
        getUrlMethod.init(wrapper, null,
                "getUrl");
        getHitTestResultMethod.init(wrapper, null,
                "getHitTestResult");
        getContentHeightMethod.init(wrapper, null,
                "getContentHeight");
        getTitleMethod.init(wrapper, null,
                "getTitle");
        getOriginalUrlMethod.init(wrapper, null,
                "getOriginalUrl");
        getNavigationHistoryMethod.init(wrapper, null,
                "getNavigationHistory");
        addJavascriptInterfaceObjectStringMethod.init(wrapper, null,
                "addJavascriptInterface", Object.class, String.class);
        removeJavascriptInterfaceStringMethod.init(wrapper, null,
                "removeJavascriptInterface", String.class);
        evaluateJavascriptStringValueCallbackMethod.init(wrapper, null,
                "evaluateJavascript", String.class, ValueCallback.class);
        clearCachebooleanMethod.init(wrapper, null,
                "clearCache", boolean.class);
        clearCacheForSingleFileStringMethod.init(wrapper, null,
                "clearCacheForSingleFile", String.class);
        hasEnteredFullscreenMethod.init(wrapper, null,
                "hasEnteredFullscreen");
        leaveFullscreenMethod.init(wrapper, null,
                "leaveFullscreen");
        pauseTimersMethod.init(wrapper, null,
                "pauseTimers");
        resumeTimersMethod.init(wrapper, null,
                "resumeTimers");
        onHideMethod.init(wrapper, null,
                "onHide");
        onShowMethod.init(wrapper, null,
                "onShow");
        onDestroyMethod.init(wrapper, null,
                "onDestroy");
        startActivityForResultIntentintBundleMethod.init(wrapper, null,
                "startActivityForResult", Intent.class, int.class, Bundle.class);
        onActivityResultintintIntentMethod.init(wrapper, null,
                "onActivityResult", int.class, int.class, Intent.class);
        onNewIntentIntentMethod.init(wrapper, null,
                "onNewIntent", Intent.class);
        saveStateBundleMethod.init(wrapper, null,
                "saveState", Bundle.class);
        restoreStateBundleMethod.init(wrapper, null,
                "restoreState", Bundle.class);
        getAPIVersionMethod.init(wrapper, null,
                "getAPIVersion");
        getXWalkVersionMethod.init(wrapper, null,
                "getXWalkVersion");
        setUIClientXWalkUIClientInternalMethod.init(wrapper, null,
                "setUIClient", coreBridge.getWrapperClass("XWalkUIClient"));
        setResourceClientXWalkResourceClientInternalMethod.init(wrapper, null,
                "setResourceClient", coreBridge.getWrapperClass("XWalkResourceClient"));
        setBackgroundColorintMethod.init(wrapper, null,
                "setBackgroundColor", int.class);
        setOriginAccessWhitelistStringStringArrayMethod.init(wrapper, null,
                "setOriginAccessWhitelist", String.class, String[].class);
        setLayerTypeintPaintMethod.init(wrapper, null,
                "setLayerType", int.class, Paint.class);
        setUserAgentStringStringMethod.init(wrapper, null,
                "setUserAgentString", String.class);
        getUserAgentStringMethod.init(wrapper, null,
                "getUserAgentString");
        setAcceptLanguagesStringMethod.init(wrapper, null,
                "setAcceptLanguages", String.class);
        captureBitmapAsyncXWalkGetBitmapCallbackInternalMethod.init(wrapper, null,
                "captureBitmapAsync", coreBridge.getWrapperClass("XWalkGetBitmapCallback"));
        getSettingsMethod.init(wrapper, null,
                "getSettings");
        setNetworkAvailablebooleanMethod.init(wrapper, null,
                "setNetworkAvailable", boolean.class);
        getRemoteDebuggingUrlMethod.init(wrapper, null,
                "getRemoteDebuggingUrl");
        zoomInMethod.init(wrapper, null,
                "zoomIn");
        zoomOutMethod.init(wrapper, null,
                "zoomOut");
        zoomByfloatMethod.init(wrapper, null,
                "zoomBy", float.class);
        canZoomInMethod.init(wrapper, null,
                "canZoomIn");
        canZoomOutMethod.init(wrapper, null,
                "canZoomOut");
        onCreateInputConnectionEditorInfoMethod.init(wrapper, null,
                "onCreateInputConnection", EditorInfo.class);
        setInitialScaleintMethod.init(wrapper, null,
                "setInitialScale", int.class);
        getFaviconMethod.init(wrapper, null,
                "getFavicon");
        setZOrderOnTopbooleanMethod.init(wrapper, null,
                "setZOrderOnTop", boolean.class);
        clearFormDataMethod.init(wrapper, null,
                "clearFormData");
        setVisibilityintMethod.init(wrapper, null,
                "setVisibility", int.class);
        setSurfaceViewVisibilityintMethod.init(wrapper, null,
                "setSurfaceViewVisibility", int.class);
        setXWalkViewInternalVisibilityintMethod.init(wrapper, null,
                "setXWalkViewInternalVisibility", int.class);
        setDownloadListenerXWalkDownloadListenerInternalMethod.init(wrapper, null,
                "setDownloadListener", coreBridge.getWrapperClass("XWalkDownloadListener"));
        performLongClickDelegateMethod.init(wrapper, null,
                "performLongClickDelegate");
        onTouchEventDelegateMotionEventMethod.init(wrapper, null,
                "onTouchEventDelegate", MotionEvent.class);
        onTouchEventMotionEventMethod.init(wrapper, null,
                "onTouchEvent", MotionEvent.class);
        onScrollChangedDelegateintintintintMethod.init(wrapper, null,
                "onScrollChangedDelegate", int.class, int.class, int.class, int.class);
        onFocusChangedDelegatebooleanintRectMethod.init(wrapper, null,
                "onFocusChangedDelegate", boolean.class, int.class, Rect.class);
        onOverScrolledDelegateintintbooleanbooleanMethod.init(wrapper, null,
                "onOverScrolledDelegate", int.class, int.class, boolean.class, boolean.class);
        setOnTouchListenerOnTouchListenerMethod.init(wrapper, null,
                "setOnTouchListener", OnTouchListener.class);
        scrollTointintMethod.init(wrapper, null,
                "scrollTo", int.class, int.class);
        scrollByintintMethod.init(wrapper, null,
                "scrollBy", int.class, int.class);
        computeHorizontalScrollRangeMethod.init(wrapper, null,
                "computeHorizontalScrollRange");
        computeHorizontalScrollOffsetMethod.init(wrapper, null,
                "computeHorizontalScrollOffset");
        computeVerticalScrollRangeMethod.init(wrapper, null,
                "computeVerticalScrollRange");
        computeVerticalScrollOffsetMethod.init(wrapper, null,
                "computeVerticalScrollOffset");
        computeVerticalScrollExtentMethod.init(wrapper, null,
                "computeVerticalScrollExtent");
        getExtensionManagerMethod.init(wrapper, null,
                "getExtensionManager");
        clearSslPreferencesMethod.init(wrapper, null,
                "clearSslPreferences");
        clearClientCertPreferencesRunnableMethod.init(wrapper, null,
                "clearClientCertPreferences", Runnable.class);
        getCertificateMethod.init(wrapper, null,
                "getCertificate");
        setFindListenerXWalkFindListenerInternalMethod.init(wrapper, null,
                "setFindListener", coreBridge.getWrapperClass("XWalkFindListener"));
        findAllAsyncStringMethod.init(wrapper, null,
                "findAllAsync", String.class);
        findNextbooleanMethod.init(wrapper, null,
                "findNext", boolean.class);
        clearMatchesMethod.init(wrapper, null,
                "clearMatches");
        getCompositingSurfaceTypeMethod.init(wrapper, null,
                "getCompositingSurfaceType");
    }
}
